# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=krename
pkgver=5.0.2
pkgrel=2
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://apps.kde.org/en/krename"
pkgdesc="Utility to handle specialized file renames"
license="GPL-2.0-or-later"
makedepends="
	extra-cmake-modules
	kcompletion5-dev
	kconfig5-dev
	kcoreaddons5-dev
	kcrash5-dev
	ki18n5-dev
	kiconthemes5-dev
	kio5-dev
	kitemviews5-dev
	kjobwidgets5-dev
	kjs-dev
	kservice5-dev
	kwidgetsaddons5-dev
	kxmlgui5-dev
	qt5-qtbase-dev
	samurai
	"
_repo_url="https://invent.kde.org/utilities/krename.git"
source="https://download.kde.org/stable/krename/$pkgver/src/krename-$pkgver.tar.xz"
subpackages="$pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
c065d6de90c43e5297db2773d8569279535b007d3b00b99a252329e78c90dc949678ecd2f2ecaa74e72394fa0e848b8774f6f387d4a7f367b367b1dd38405545  krename-5.0.2.tar.xz
"
